package com.jiyun.service;

import com.jiyun.dao.CityMapper;
import com.jiyun.entity.City;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CityService {

    @Autowired(required = false)
    private CityMapper mapper;

    public List<City> getAll(){
        return mapper.selectAll();
    }

    public City getCity(int id){
        return mapper.selectByPrimaryKey(id);
    }

}
